<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let obj = {
            name: '小米青春10',
            weight: '0.55kg',
            color: 'red'
        }
        console.log(obj.name);
        console.log(obj['weight']);

        // 修改 先获取，再赋值
        obj.name = '华为pro'
        console.log(obj.name);
        // 新增 对象.属性名属性值
        obj.size = 1
        console.log(obj.size);
        // 删除 delete 对象.属性名
        delete obj.size
        console.log(obj);

        // 请修改产品对象
        obj.name = '小米10PLUS'
        obj.color = 'pink'
        document.write(obj.name);
        document.write(`<br>`);
        document.write(obj.weight);
        document.write(`<br>`);
        document.write(obj.color);

    </script>
</body>

</html>